package com.pgybook.db.entity.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class OrderHistoryEx {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrderHistoryEx() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOrderhisidIsNull() {
            addCriterion("ORDERHISID is null");
            return (Criteria) this;
        }

        public Criteria andOrderhisidIsNotNull() {
            addCriterion("ORDERHISID is not null");
            return (Criteria) this;
        }

        public Criteria andOrderhisidEqualTo(Long value) {
            addCriterion("ORDERHISID =", value, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidNotEqualTo(Long value) {
            addCriterion("ORDERHISID <>", value, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidGreaterThan(Long value) {
            addCriterion("ORDERHISID >", value, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidGreaterThanOrEqualTo(Long value) {
            addCriterion("ORDERHISID >=", value, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidLessThan(Long value) {
            addCriterion("ORDERHISID <", value, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidLessThanOrEqualTo(Long value) {
            addCriterion("ORDERHISID <=", value, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidIn(List<Long> values) {
            addCriterion("ORDERHISID in", values, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidNotIn(List<Long> values) {
            addCriterion("ORDERHISID not in", values, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidBetween(Long value1, Long value2) {
            addCriterion("ORDERHISID between", value1, value2, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderhisidNotBetween(Long value1, Long value2) {
            addCriterion("ORDERHISID not between", value1, value2, "orderhisid");
            return (Criteria) this;
        }

        public Criteria andOrderidIsNull() {
            addCriterion("ORDERID is null");
            return (Criteria) this;
        }

        public Criteria andOrderidIsNotNull() {
            addCriterion("ORDERID is not null");
            return (Criteria) this;
        }

        public Criteria andOrderidEqualTo(Long value) {
            addCriterion("ORDERID =", value, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidNotEqualTo(Long value) {
            addCriterion("ORDERID <>", value, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidGreaterThan(Long value) {
            addCriterion("ORDERID >", value, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidGreaterThanOrEqualTo(Long value) {
            addCriterion("ORDERID >=", value, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidLessThan(Long value) {
            addCriterion("ORDERID <", value, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidLessThanOrEqualTo(Long value) {
            addCriterion("ORDERID <=", value, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidIn(List<Long> values) {
            addCriterion("ORDERID in", values, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidNotIn(List<Long> values) {
            addCriterion("ORDERID not in", values, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidBetween(Long value1, Long value2) {
            addCriterion("ORDERID between", value1, value2, "orderid");
            return (Criteria) this;
        }

        public Criteria andOrderidNotBetween(Long value1, Long value2) {
            addCriterion("ORDERID not between", value1, value2, "orderid");
            return (Criteria) this;
        }

        public Criteria andModtypeIsNull() {
            addCriterion("MODTYPE is null");
            return (Criteria) this;
        }

        public Criteria andModtypeIsNotNull() {
            addCriterion("MODTYPE is not null");
            return (Criteria) this;
        }

        public Criteria andModtypeEqualTo(Integer value) {
            addCriterion("MODTYPE =", value, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeNotEqualTo(Integer value) {
            addCriterion("MODTYPE <>", value, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeGreaterThan(Integer value) {
            addCriterion("MODTYPE >", value, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("MODTYPE >=", value, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeLessThan(Integer value) {
            addCriterion("MODTYPE <", value, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeLessThanOrEqualTo(Integer value) {
            addCriterion("MODTYPE <=", value, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeIn(List<Integer> values) {
            addCriterion("MODTYPE in", values, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeNotIn(List<Integer> values) {
            addCriterion("MODTYPE not in", values, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeBetween(Integer value1, Integer value2) {
            addCriterion("MODTYPE between", value1, value2, "modtype");
            return (Criteria) this;
        }

        public Criteria andModtypeNotBetween(Integer value1, Integer value2) {
            addCriterion("MODTYPE not between", value1, value2, "modtype");
            return (Criteria) this;
        }

        public Criteria andCrttimeIsNull() {
            addCriterion("CRTTIME is null");
            return (Criteria) this;
        }

        public Criteria andCrttimeIsNotNull() {
            addCriterion("CRTTIME is not null");
            return (Criteria) this;
        }

        public Criteria andCrttimeEqualTo(Date value) {
            addCriterion("CRTTIME =", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeNotEqualTo(Date value) {
            addCriterion("CRTTIME <>", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeGreaterThan(Date value) {
            addCriterion("CRTTIME >", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeGreaterThanOrEqualTo(Date value) {
            addCriterion("CRTTIME >=", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeLessThan(Date value) {
            addCriterion("CRTTIME <", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeLessThanOrEqualTo(Date value) {
            addCriterion("CRTTIME <=", value, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeIn(List<Date> values) {
            addCriterion("CRTTIME in", values, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeNotIn(List<Date> values) {
            addCriterion("CRTTIME not in", values, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeBetween(Date value1, Date value2) {
            addCriterion("CRTTIME between", value1, value2, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrttimeNotBetween(Date value1, Date value2) {
            addCriterion("CRTTIME not between", value1, value2, "crttime");
            return (Criteria) this;
        }

        public Criteria andCrtstaffIsNull() {
            addCriterion("CRTSTAFF is null");
            return (Criteria) this;
        }

        public Criteria andCrtstaffIsNotNull() {
            addCriterion("CRTSTAFF is not null");
            return (Criteria) this;
        }

        public Criteria andCrtstaffEqualTo(Integer value) {
            addCriterion("CRTSTAFF =", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffNotEqualTo(Integer value) {
            addCriterion("CRTSTAFF <>", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffGreaterThan(Integer value) {
            addCriterion("CRTSTAFF >", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffGreaterThanOrEqualTo(Integer value) {
            addCriterion("CRTSTAFF >=", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffLessThan(Integer value) {
            addCriterion("CRTSTAFF <", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffLessThanOrEqualTo(Integer value) {
            addCriterion("CRTSTAFF <=", value, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffIn(List<Integer> values) {
            addCriterion("CRTSTAFF in", values, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffNotIn(List<Integer> values) {
            addCriterion("CRTSTAFF not in", values, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffBetween(Integer value1, Integer value2) {
            addCriterion("CRTSTAFF between", value1, value2, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andCrtstaffNotBetween(Integer value1, Integer value2) {
            addCriterion("CRTSTAFF not between", value1, value2, "crtstaff");
            return (Criteria) this;
        }

        public Criteria andOrgdataIsNull() {
            addCriterion("ORGDATA is null");
            return (Criteria) this;
        }

        public Criteria andOrgdataIsNotNull() {
            addCriterion("ORGDATA is not null");
            return (Criteria) this;
        }

        public Criteria andOrgdataEqualTo(String value) {
            addCriterion("ORGDATA =", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataNotEqualTo(String value) {
            addCriterion("ORGDATA <>", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataGreaterThan(String value) {
            addCriterion("ORGDATA >", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataGreaterThanOrEqualTo(String value) {
            addCriterion("ORGDATA >=", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataLessThan(String value) {
            addCriterion("ORGDATA <", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataLessThanOrEqualTo(String value) {
            addCriterion("ORGDATA <=", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataLike(String value) {
            addCriterion("ORGDATA like", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataNotLike(String value) {
            addCriterion("ORGDATA not like", value, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataIn(List<String> values) {
            addCriterion("ORGDATA in", values, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataNotIn(List<String> values) {
            addCriterion("ORGDATA not in", values, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataBetween(String value1, String value2) {
            addCriterion("ORGDATA between", value1, value2, "orgdata");
            return (Criteria) this;
        }

        public Criteria andOrgdataNotBetween(String value1, String value2) {
            addCriterion("ORGDATA not between", value1, value2, "orgdata");
            return (Criteria) this;
        }

        public Criteria andDesdataIsNull() {
            addCriterion("DESDATA is null");
            return (Criteria) this;
        }

        public Criteria andDesdataIsNotNull() {
            addCriterion("DESDATA is not null");
            return (Criteria) this;
        }

        public Criteria andDesdataEqualTo(String value) {
            addCriterion("DESDATA =", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataNotEqualTo(String value) {
            addCriterion("DESDATA <>", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataGreaterThan(String value) {
            addCriterion("DESDATA >", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataGreaterThanOrEqualTo(String value) {
            addCriterion("DESDATA >=", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataLessThan(String value) {
            addCriterion("DESDATA <", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataLessThanOrEqualTo(String value) {
            addCriterion("DESDATA <=", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataLike(String value) {
            addCriterion("DESDATA like", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataNotLike(String value) {
            addCriterion("DESDATA not like", value, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataIn(List<String> values) {
            addCriterion("DESDATA in", values, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataNotIn(List<String> values) {
            addCriterion("DESDATA not in", values, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataBetween(String value1, String value2) {
            addCriterion("DESDATA between", value1, value2, "desdata");
            return (Criteria) this;
        }

        public Criteria andDesdataNotBetween(String value1, String value2) {
            addCriterion("DESDATA not between", value1, value2, "desdata");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}